/* eslint-disable space-before-function-paren */
import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/pages/home/Index'
import Home from '@/pages/index/Home'
import News from '@/pages/news/News'
import Deatil from '@/pages/deatil/Deatil'
import Case from '@/pages/case/Case'
import Expert from '@/pages/expert/Expert'
import Source from '@/pages/source/Source'
import Admin from '@/pages/login/admin/Admin'
import AdminAbout from '@/pages/login/admin/components/About'
import AdminService from '@/pages/login/admin/components/Service'
import AdminSwiper from '@/pages/login/admin/components/Swiper'
import AdminNews from '@/pages/login/admin/components/News'
import AdminCase from '@/pages/login/admin/components/Case'
import AdminExpert from '@/pages/login/admin/components/Expert'
import AdminSource from '@/pages/login/admin/components/Source'
import AdminList from '@/pages/login/admin/components/List'
import AdminEdit from '@/pages/login/admin/components/Edit'
import AdminNewsList from '@/pages/login/admin/components/NewsList'
import AdminLunchNews from '@/pages/login/admin/components/LunchNews'
import AdminLunchNotice from '@/pages/login/admin/components/LunchNotice'
import AdminMessage from '@/pages/login/admin/components/Message'
import Login from '@/pages/login/Login'
import Forget from '@/pages/login/Forget'
import NewUser from '@/pages/login/NewUser'
import PhoneHome from '@/pages/phone/home/PhoneHome'
import PhoneIndex from '@/pages/phone/index/index'
import PhoneExpert from '@/pages/phone/expert/PhoneExpert'
import PhoneCase from '@/pages/phone/case/PhoneCase'
import PhoneNews from '@/pages/phone/news/PhoneNews'
import PhoneDeatil from '@/pages/phone/deatil/PhoneDeatil'

Vue.use(Router)

export default new Router({
  routes: [{
    path: '/',
    name: 'Index',
    component: Index,
    redirect: '/Home',
    children: [{
      path: '/home',
      name: 'Home',
      component: Home,
      props: true
    }, {
      path: '/News',
      name: 'News',
      component: News,
      props: true
    }, {
      path: '/Case',
      name: 'Case',
      component: Case,
      props: true
    }, {
      path: '/Expert',
      name: 'Expert',
      component: Expert,
      props: true
    }, {
      path: '/Admin',
      name: 'Admin',
      component: Admin,
      redirect: '/AdminSwiper',
      props: true,
      children: [{
        path: '/AdminAbout',
        name: 'AdminAbout',
        component: AdminAbout,
        props: true
      }, {
        path: '/AdminService',
        name: 'AdminService',
        component: AdminService,
        props: true
      }, {
        path: '/AdminSwiper',
        name: 'AdminSwiper',
        component: AdminSwiper,
        props: true
      }, {
        path: '/AdminNews',
        name: 'AdminNews',
        component: AdminNews,
        props: true
      }, {
        path: '/AdminCase',
        name: 'AdminCase',
        component: AdminCase,
        props: true
      }, {
        path: '/AdminExpert',
        name: 'AdminExpert',
        component: AdminExpert,
        props: true
      }, {
        path: '/AdminSource',
        name: 'AdminSource',
        component: AdminSource,
        props: true
      }, {
        path: '/AdminList',
        name: 'AdminList',
        component: AdminList,
        props: true
      }, {
        path: '/AdminNewsList',
        name: 'AdminNewsList',
        component: AdminNewsList,
        props: true
      }, {
        path: '/AdminEdit',
        name: 'AdminEdit',
        component: AdminEdit,
        props: true
      }, {
        path: '/AdminLunchNews',
        name: 'AdminLunchNews',
        component: AdminLunchNews,
        props: true
      }, {
        path: '/AdminLunchNotice',
        name: 'AdminLunchNotice',
        component: AdminLunchNotice,
        props: true
      }, {
        path: '/AdminMessage',
        name: 'AdminMessage',
        component: AdminMessage,
        props: true
      }]
    }, {
      path: '/Source',
      name: 'Source',
      component: Source,
      props: true
    }, {
      path: '/Deatil',
      name: 'Deatil',
      component: Deatil,
      props: true
    }, {
      path: '/Login',
      name: 'Login',
      component: Login,
      props: true
    }, {
      path: '/Forget',
      name: 'Forget',
      component: Forget,
      props: true
    }, {
      path: '/NewUser',
      name: 'NewUser',
      component: NewUser,
      props: true
    }]
  }, {
    path: '/PhoneIndex',
    name: 'PhoneIndex',
    component: PhoneIndex,
    props: true,
    redirect: '/PhoneHome',
    children: [{
      path: '/PhoneHome',
      name: 'PhoneHome',
      component: PhoneHome,
      props: true
    }, {
      path: '/PhoneExpert',
      name: 'PhoneExpert',
      component: PhoneExpert,
      props: true
    }, {
      path: '/PhoneCase',
      name: 'PhoneCase',
      component: PhoneCase,
      props: true
    }, {
      path: '/PhoneNews',
      name: 'PhoneNews',
      component: PhoneNews,
      props: true
    }]
  }, {
    path: '/PhoneDeatil',
    name: 'PhoneDeatil',
    component: PhoneDeatil,
    props: true
  }]
})
